package factory.one.entity;

/**
 * @author sk.z
 * 2023/6/26
 * 产品批次
 **/
public class Batch {

    private Long id;
    private Long orderId; //订单id
    private Long productId; //产品id
    private Integer orderNum; //订单数量
    private Integer produceNum; //生产数量
    private Integer sendNum; //发货数量
    private Integer refundNum; //退货数量
    private String remark; //备注
    private Integer price; //单价(分)
    private Integer status; //0-删除 1-正常
    private String produceUsers; //生产用户

    //for view
    private String productName; //产品名称
    private Integer produceGap; //生产缺口
    private Integer sendGap; //发送缺口
    private Integer amount; //总额(分)

    public static final String CREATE_SQL = "    create table BATCH (\n" +
            "        ID bigint not null GENERATED ALWAYS AS IDENTITY,\n" +
            "        ORDER_ID bigint not null,\n" +
            "        PRODUCT_ID bigint not null,\n" +
            "        ORDER_NUM int not null default 0,\n" +
            "        PRODUCE_NUM int not null default 0,\n" +
            "        SEND_NUM int not null default 0,\n" +
            "        REFUND_NUM int not null default 0,\n" +
            "        REMARK varchar(255) ,\n" +
            "        PRICE int ,\n" +
            "        STATUS int default 1,\n" +
            "        PRODUCE_USER varchar(255),\n" +
            "        primary key (ID)\n" +
            "    )";

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public Integer getProduceNum() {
        return produceNum;
    }

    public void setProduceNum(Integer produceNum) {
        this.produceNum = produceNum;
    }

    public Integer getSendNum() {
        return sendNum;
    }

    public void setSendNum(Integer sendNum) {
        this.sendNum = sendNum;
    }

    public Integer getRefundNum() {
        return refundNum;
    }

    public void setRefundNum(Integer refundNum) {
        this.refundNum = refundNum;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Integer getProduceGap() {
        return produceGap;
    }

    public void setProduceGap(Integer produceGap) {
        this.produceGap = produceGap;
    }

    public Integer getSendGap() {
        return sendGap;
    }

    public void setSendGap(Integer sendGap) {
        this.sendGap = sendGap;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getProduceUsers() {
        return produceUsers;
    }

    public void setProduceUsers(String produceUsers) {
        this.produceUsers = produceUsers;
    }

}
